AddressBookContact Class
Holds a Contact record in a Mac OS X Address Book.
More information available in parent classes: AddressBookRecord:Object
Constructor
Name | Parameters | Description |
Constructor | [vcard as String] | Creates an AddressBookContact; if the optional vcard is passed, populates it with the data in the vcard. |
Notes
The methods of the AddressBookData class give you access to the labels, names, values, and other properties of AddressBookContact records. Use the Value method to get and set values.
Example
This method gets the current user's email addresses. It uses the Count and Value methods of the AddressBookData class to do so
Dim Book as AddressBook
Dim i as Integer
Dim myContact as AddressBookContact
book= System.AddressBook
myContact=Book.CurrentUser
For i=0 to myContact.emailAddresses.Count-1
ListBox1.AddRow myContact.emailAddresses.Value(i)
Next
Dim i as Integer
Dim myContact as AddressBookContact
book= System.AddressBook
myContact=Book.CurrentUser
For i=0 to myContact.emailAddresses.Count-1
ListBox1.AddRow myContact.emailAddresses.Value(i)
Next
.
The following method sets the value of the FirstName field.
Dim Book as AddressBook
Dim i as Integer
Dim myContact as AddressBookContact
book= System.AddressBook
myContact=Book.CurrentUser
myContact.FirstName="Boris"
//or using AddressBookData.Value method
myContact.FirstName.Value="Boris"
Dim i as Integer
Dim myContact as AddressBookContact
book= System.AddressBook
myContact=Book.CurrentUser
myContact.FirstName="Boris"
//or using AddressBookData.Value method
myContact.FirstName.Value="Boris"
See Also
AddressBook, AddressBookAddress, AddressBookData, AddressBookGroup, AddressBookRecord classes.